#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
    int n=0,i=0,m;
    cin >> m;
    while(n <= m){
        i += 1;
        n += i;
    }
    cout << i;
    return 0;
}